from selenium.webdriver.common.by import By

from base import BaseAction


class JsYxPageHome(BaseAction):
    menu_js_yx_ele = By.XPATH, '//*[@id="JS-zj"]/div'
    search1_js_ele = By.XPATH, '//*/form/div[2]/div/div/div'  # 点击筛选框
    search2_js_ele = By.XPATH, '//*[@class="yg-search-bar"]//div[2]//*[text()="技师待接收"]'  # 筛选病例
    search_js_button_ele = By.XPATH, '//*[text()="查询"]'  #
    receive_js_ele = By.XPATH, '//tr[1]/td[9]/i[2]'  # 接收按钮
    receive_js_button_ele = By.XPATH, '//*[text()="接收"]'  # 确认接收
    details_ele = By.XPATH, '//tr[1]/td[9]/i[1][text()="详情"]'
    see_model_ele = By.XPATH, '//li[4]//span[text()="查看"]'
    see_model_success_ele = By.XPATH, '//*[text()="0%"]'  # 校验有没有加载完成有元素0%
    see_model_close_ele = By.XPATH, '//*/span[7]/i'  # 关闭页面

    def get_menu_js_yx_ele(self):  # 技师点击隐形正畸菜单栏
        return self.get_element(self.menu_js_yx_ele)

    def get_search1_js_ele(self):
        return self.get_element(self.search1_js_ele)

    def get_search2_js_ele(self):
        return self.get_element(self.search2_js_ele)

    def get_search_js_button_ele(self):
        return self.get_element(self.search_js_button_ele)

    def get_receive_js_ele(self):
        return self.get_element(self.receive_js_ele)

    def get_receive_js_button_ele(self):
        return self.get_element(self.receive_js_button_ele)

    def get_details_ele(self):
        return self.get_element(self.details_ele)

    def get_see_model_ele(self):
        return self.get_element(self.see_model_ele)

    def get_see_model_success_ele(self):
        return self.get_element(self.see_model_success_ele)

    def get_see_model_close_ele(self):
        return self.get_element(self.see_model_close_ele)
